<template>
    <div>
        <!-- <h1>修改用户信息</h1>
        用户名：<input type="text" v-model="username">
        <button>确认</button> -->

        <!-- <a-input-group size="large">
            <a-row :gutter="8">
                <a-col :span="5">
                <a-input default-value="用户名" />
                </a-col>
                <a-col :span="8">
                <a-input default-value="26888888" />
                </a-col>
            </a-row>
        </a-input-group> -->

        <div>
            <a-input-group compact>
            用户名：
            <a-input style="width: 15%" v-model="username" />
            <a-button @click="sub">确认</a-button>
        </a-input-group>
        </div>
    </div>
</template>

<script>
export default {
    data() {
        return {
            id:this.$route.query.id,
            userlist:[],
            username:''
        }
    },

    mounted() {
        // this.axios.get("http://localhost:8000/users/",{params:{'id':this.id}}).then(res=>{
        //     console.log(res.data)
        //     this.userlist = res.data
        // })
    },

    methods:{
        sub(){
            this.axios.post("http://localhost:8000/alter/",this.qs.stringify({'id':this.id,'username':this.username})).then(res=>{
                console.log(res.data)
            })
        }
    }
}
</script>

<style>

</style>